package com.study.repository;

import com.study.entity.Person;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface PersonRepository extends Neo4jRepository<Person, String> {

    @Query("MATCH (n:Person) WHERE id(n) = $0 RETURN n")
    List<Person> findChildList(String id);
}
